<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>项目管理</title>
    <meta name="description" content="">
    <meta name="author" content="templatemo">
    <link href="../css/font-awesome.min.css" rel="stylesheet">
    <link href="../css/bootstrap.min.css" rel="stylesheet">
    <link href="../css/templatemo-style.css" rel="stylesheet">
    <link href="../css/admin.css" rel="stylesheet">
    <script src="http://libs.baidu.com/jquery/1.11.3/jquery.min.js"></script>
    <script src="../js/admin.js"></script>
</head>

<body>
    <?php
    require_once "../congfig/config.php";
    require_once "../lib/common.php";
    session_start();
    checkAdmin();
    $uid = $_GET['uid'];
    $sql = "select * from users where uid = '$uid' ";
    $query = $conn->query($sql);
    $result = $query->fetch_array();
    ?>
    <!-- Left column -->
    <div class="templatemo-flex-row">
        <div class="templatemo-sidebar">
            <header class="templatemo-site-header">
                <div class="square"></div>
                <h1>后台管理系统</h1>
            </header>
            <div class="profile-photo-container">
                <img src="../images/profile-photo.jpg" alt="Profile Photo" class="img-responsive">
            </div>
            <!-- Search box -->

            <div class="mobile-menu-icon">
                <i class="fa fa-bars"></i>
            </div>
            <nav class="templatemo-left-nav">
                <ul>
                    <li id="xmgl"><a href="project-list.php"><i class="fa fa-bars fa-fw"></i>项目管理</a>
                    <ul>
                            <li><a href="addProject.php"><i class="fa fa-bars fa-fw"></i>添加项目</a></li>
                        </ul>
                        <ul>
                            <li><a href="applyproject.php"><i class="fa fa-bars fa-fw"></i>申请立项</a></li>
                        </ul>
                        <ul>
                            <li><a href="projectsucc.php"><i class="fa fa-bars fa-fw"></i>立项成功</a></li>
                        </ul>
                        <ul>
                            <li><a href="projectfail.php"><i class="fa fa-bars fa-fw"></i>立项失败</a></li>
                        </ul>
                        <ul>
                            <li><a href="applyprojectover.php"><i class="fa fa-bars fa-fw"></i>申请结项</a></li>
                        </ul>
                        <ul>
                            <li><a href="projectok.php"><i class="fa fa-bars fa-fw"></i>结项成功</a></li>
                        </ul>
                        <ul>
                            <li><a href="projectnok.php"><i class="fa fa-bars fa-fw"></i>结项失败</a></li>
                        </ul>
                        <ul>
                            <li><a href="goodpro.php"><i class="fa fa-bars fa-fw"></i>逾期项目</a></li>
                        </ul>
                    </li>
                    <li id="yhgl"><a href="user-list.php"><i class="fa fa-user fa-fw"></i>用户管理</a>
                        <ul>
                            <li><a href="addUser.php"><i class="fa fa-user fa-fw"></i>添加用户</a></li>
                        </ul>
                    </li>
                    <li><a href="pad-check.php"><i class="fa fa-cog fa-fw"></i>修改密码</a></li>
                    <li><a href="../loginout.php" id="zx"><i class="fa fa-map-marker fa-fw"></i>注销</a></li>
                </ul>
            </nav>
        </div>
        <!-- Main content -->
        <div class="templatemo-content col-1 light-gray-bg" style="height:1000px;">
            <div class="container" style="margin-top:100px;">
                <a style="font-size:18px; color:rgb(19,137,95);" href="user-list.php"><i class="fa fa-arrow-circle-left fa-fw"></i>
                    返 回</a>
                <div style="padding: 50px 0;margin-top: 50px;text-align: right;width: 420px;margin: 50px auto;">
                    <form class="form-horizontal" id="edituser"  >
                        <div class="form-group">
                            <label class="col-xs-4 control-label">用户名：</label>
                            <div class="col-xs-8">
                                <input type="hidden" name="uid" value="<?php echo $uid ?>" />
                                <input type="text" id="username1" name="username" class="form-control input-sm duiqi"
                                    style="margin-top: 7px;" value="<?php echo $result['username'] ?>" readonly >
                            </div>
                        </div>
                        <?php
                        $sql = "select * from userinfor where uid = '$uid'";
                        $query = $conn->query($sql);
                        $result = $query->fetch_array();
                        ?>
                        <div class="form-group">
                            <label class="col-xs-4 control-label">真实姓名：</label>
                            <div class="col-xs-8">
                                <input type="text" id="realname" name="realname" class="form-control input-sm duiqi"
                                    style="margin-top: 7px;" value="<?php echo $result['realname'] ?>" required >
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-4 control-label">年龄：</label>
                            <div class="col-xs-8">
                                <input type="text" id="age" name="age" class="form-control input-sm duiqi"
                                    style="margin-top: 7px;"value="<?php echo $result['age'] ?>" required>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-4 control-label">电话：</label>
                            <div class="col-xs-8">
                                <input type="text" id="phone" name="phone" class="form-control input-sm duiqi" style="margin-top: 7px;"
                                value="<?php echo $result['phone'] ?>" required
                                >
                            </div>
                        </div>
                        <div class="form-group">
                        <label class="col-xs-4 control-label">用户类型：</label>
                                <div class="col-xs-8" style="margin-left:-100px;margin-top: 10px;">
                                <select>
                                    <option value ="0" selected>普通用户</option>
                                    <option value ="1">教师</option>
                                </select>
                                </div>
                        </div>  
                        <div class="form-group">
                            <div class="col-xs-offset-4 col-xs-5">
                                <button type="button" id="alterTypeUser-bc" class="btn btn-xs btn-success">保存</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>


    </div>
</body>

</html>